/*
 * Copyright © 2016 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@import "../../../styles/variables.less";

@button-color: #555555;

my-sql-conditions {
  .sql-conditions-container {
    .rule { margin-bottom: 10px; }
    .empty-message { margin-bottom: 0; }

    .select-fields-group {
      position: relative;
      left: 0;
      background-color: #eeeeee;
      padding: 0 10px 5px;
      display: inline-block;
      width: ~"-moz-calc(100% - 50px)";
      width: ~"-webkit-calc(100% - 50px)";
      width: ~"calc(100% - 50px)";

      .delete-field-button {
        color: white;
        background-color: @brand-danger;
        padding: 0 5px 1px 5px;
        border-radius: 50%;
        position: absolute;
        right: -5px;
        top: -5px;
        cursor: pointer;

        &:hover { text-decoration: none; }
      }

      .select-field {
        width: 43%;
        display: inline-block;
        margin-top: 5px;
      }

      .field-equality {
        display: inline-block;
        color: white;
        background-color: @button-color;
        padding: 0 5px;
        margin-left: 5px;
      }

    }

    .rule-action-buttons {
      padding-left: 5px;
      display: inline-block;
      vertical-align: bottom;

      .btn.btn-field-actions {
        vertical-align: bottom;
        border-radius: 0;
        color: white;
        background-color: @button-color;
        padding: 5px;

        &.plus { padding: 5px 10px; }
      }
    }
  }
}
